package com.younion.business.impl;

import java.util.List;
import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.younion.business.IMemberCardUpgradeLogService;
import com.younion.common.exception.BaseException;
import com.younion.common.paginator.Paginator;
import com.younion.dao.MemberCardUpgradeLogDAO;
import com.younion.vo.MemberCardUpgradeLogVO;

public class MemberCardUpgradeLogServiceImpl extends BaseService implements IMemberCardUpgradeLogService {
	
	protected static final Log logger = LogFactory.getLog(MemberCardUpgradeLogServiceImpl.class);
	
	private MemberCardUpgradeLogDAO memberCardUpgradeLogDAO;

	public Integer insertByVo(MemberCardUpgradeLogVO memberCardUpgradeLogVO) throws BaseException {
		try {
			return this.memberCardUpgradeLogDAO.insertByVo(memberCardUpgradeLogVO);
		} catch (Exception e) {
			logger.error(e.getMessage(), e);
			throw new BaseException(MemberCardUpgradeLogServiceImpl.class.getName()
							+ " >> public Integer insertByVo(MemberCardUpgradeLogDAO memberCardUpgradeLogDAO) error occur:", e);
		}
	}

	public int selectCountByMap(Map paramMap) throws BaseException {
		try {
			return this.memberCardUpgradeLogDAO.selectCountByMap(paramMap);
		} catch (Exception e) {
			logger.error(e.getMessage(), e);
			throw new BaseException(MemberCardUpgradeLogServiceImpl.class.getName()
							+ " >> public int selectCountByMap(Map paramMap) error occur:", e);
		}
	}

	public List selectForPage(Map condition, Paginator paginator) throws BaseException {
		try {
			return this.memberCardUpgradeLogDAO.selectForPage(condition, paginator);
		} catch (Exception e) {
			logger.error(e.getMessage(), e);
			throw new BaseException(MemberCardUpgradeLogServiceImpl.class.getName()
							+ " >> public List selectForPage(Map condition, Paginator paginator) error occur:", e);
		}
	}

	public void setMemberCardUpgradeLogDAO(
			MemberCardUpgradeLogDAO memberCardUpgradeLogDAO) {
		this.memberCardUpgradeLogDAO = memberCardUpgradeLogDAO;
	}

}
